<?php use_stylesheets_for_form($form) ?>
<?php use_javascripts_for_form($form) ?>

<form action="<?php echo url_for('invoices/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?id_invoice='.$form->getObject()->getIdInvoice() : '')) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
<?php if (!$form->getObject()->isNew()): ?>
<input type="hidden" name="sf_method" value="put" />
<?php endif; ?>
<?php echo $form->renderGlobalErrors() ?>
<span class="nombre-campo"><?php echo $form['status']->renderLabel() ?> <?php echo $form['status']->renderError() ?>
          <?php echo $form['status'] ?></span><br />
          <span class="nombre-campo"><?php echo $form['is_paid']->renderLabel() ?> <?php echo $form['is_paid']->renderError() ?>
          <?php echo $form['is_paid'] ?></span><br />
          <span class="nombre-campo"><?php echo $form['invoice_amount']->renderLabel() ?><?php echo $form['invoice_amount']->renderError() ?>
          <?php echo $form['invoice_amount'] ?></span><br />
           <span class="nombre-campo"><?php echo $form['shipping_amount']->renderLabel() ?> <?php echo $form['shipping_amount']->renderError() ?>
          <?php echo $form['shipping_amount'] ?></span><br />
            <span class="nombre-campo"><?php echo $form['shipping_name']->renderLabel() ?><?php echo $form['shipping_name']->renderError() ?>
          <?php echo $form['shipping_name'] ?></span><br />
           <span class="nombre-campo"><?php echo $form['shipping_last_name']->renderLabel() ?><?php echo $form['shipping_last_name']->renderError() ?>
          <?php echo $form['shipping_last_name'] ?></span><br />
          <span class="nombre-campo"><?php echo $form['shipping_company']->renderLabel() ?> <?php echo $form['shipping_company']->renderError() ?>
          <?php echo $form['shipping_company'] ?></span><br />
          <span class="nombre-campo"><?php echo $form['shipping_address']->renderLabel() ?><?php echo $form['shipping_address']->renderError() ?>
          <?php echo $form['shipping_address'] ?></span><br />
          <span class="nombre-campo"><?php echo $form['shipping_state']->renderLabel() ?><?php echo $form['shipping_state']->renderError() ?>
          <?php echo $form['shipping_state'] ?></span><br />
           <span class="nombre-campo"><?php echo $form['shipping_city']->renderLabel() ?><?php echo $form['shipping_city']->renderError() ?>
          <?php echo $form['shipping_city'] ?></span><br />
           <span class="nombre-campo"><?php echo $form['shipping_zip']->renderLabel() ?> <?php echo $form['shipping_zip']->renderError() ?>
          <?php echo $form['shipping_zip'] ?></span><br />
			 <span class="nombre-campo"><?php echo $form['billing_address']->renderLabel() ?><?php echo $form['billing_address']->renderError() ?>
          <?php echo $form['billing_address'] ?></span><br />
          <span class="nombre-campo"><?php echo $form['billing_state']->renderLabel() ?><?php echo $form['billing_state']->renderError() ?>
          <?php echo $form['billing_state'] ?></span><br />
           <span class="nombre-campo"><?php echo $form['billing_city']->renderLabel() ?><?php echo $form['billing_city']->renderError() ?>
          <?php echo $form['billing_city'] ?></span><br />
           <span class="nombre-campo"><?php echo $form['billing_zip']->renderLabel() ?><?php echo $form['billing_zip']->renderError() ?>
          <?php echo $form['billing_zip'] ?></span><br />
          <span class="nombre-campo"><?php echo $form['billing_phone']->renderLabel() ?><?php echo $form['billing_phone']->renderError() ?>
          <?php echo $form['billing_phone'] ?></span><br />
          <span class="nombre-campo"><?php echo $form['billing_fax']->renderLabel() ?><?php echo $form['billing_fax']->renderError() ?>
          <?php echo $form['billing_fax'] ?></span><br />
          <span class="nombre-campo"><?php echo $form['billing_email']->renderLabel() ?><?php echo $form['billing_email']->renderError() ?>
          <?php echo $form['billing_email'] ?></span><br />
          <span class="nombre-campo"><?php echo $form['billing_name']->renderLabel() ?> <?php echo $form['billing_name']->renderError() ?>
          <?php echo $form['billing_name'] ?></span><br />
          <span class="nombre-campo"><?php echo $form['billing_last_name']->renderLabel() ?><?php echo $form['billing_last_name']->renderError() ?>
          <?php echo $form['billing_last_name'] ?></span><br />
          <span class="nombre-campo"><?php echo $form['billing_company']->renderLabel() ?><?php echo $form['billing_company']->renderError() ?>
          <?php echo $form['billing_company'] ?></span><br />

          <span class="nombre-campo"><?php echo $form['payment_date']->renderLabel() ?>   <?php echo $form['payment_date']->renderError() ?>
          <?php echo $form['payment_date'] ?></span><br />

          <span class="nombre-campo"><?php echo $form['id_user']->renderLabel() ?><?php echo $form['id_user']->renderError() ?>
          <?php echo $form['id_user'] ?></span><br />
          


          <?php echo $form->renderHiddenFields(false) ?>
          &nbsp;<a href="<?php echo url_for('invoices/index') ?>">Back to list</a>
          <?php if (!$form->getObject()->isNew()): ?>
            &nbsp;<?php echo link_to('Delete', 'invoices/delete?id_invoice='.$form->getObject()->getIdInvoice(), array('method' => 'delete', 'confirm' => 'Are you sure?')) ?>
          <?php endif; ?>&nbsp;

          <input type="submit" value="Save" class="button-enter" />
      
     

</form>
